<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    // 对象解构允许我们使用变量的名字匹配对象的属性 匹配成功将对象属性的值赋值给变量
    
    let person = {name: 'lisi', age: 30, gender: '男'};
    // let {name, age, gender} = person;
    // console.log(name);
    // console.log(age);
    // console.log(gender);
    let {name: myName} = person;
    console.log(myName);
    </script>
</body>
</html>